CCOMPILER=g++-4.6
CFLAGS=-std=c++0x -g -Wall

all: complete

complete: Game.o locations items characters util.o progress.o
	$(CCOMPILER) $(CFLAGS) Game.o -o game util.o charcreate.o location.o indoors.o outdoors.o character.o armor.o weapon.o otheritem.o wizard.o barbarian.o paladin.o progress.o

Game.o: Game.cpp Game.h items characters charcreate.o
	$(CCOMPILER) -c $(CFLAGS) Game.cpp -o Game.o

charcreate.o: characters CharCreate.cpp CharCreate.h
	$(CCOMPILER) -c $(CFLAGS) CharCreate.cpp -o charcreate.o

characters: character.o wizard.o barbarian.o paladin.o

character.o: Characters/Character.cpp Characters/Character.h items Progress.h
	$(CCOMPILER) -c $(CFLAGS) Characters/Character.cpp -o character.o
	
wizard.o: Characters/Wizard.cpp Characters/Wizard.h Characters/Character.h items
	$(CCOMPILER) -c $(CFLAGS) Characters/Wizard.cpp -o wizard.o
	
barbarian.o: Characters/Barbarian.cpp Characters/Barbarian.h Characters/Character.h items
	$(CCOMPILER) -c $(CFLAGS) Characters/Barbarian.cpp -o barbarian.o
	
paladin.o: Characters/Paladin.cpp Characters/Paladin.h Characters/Character.h items
	$(CCOMPILER) -c $(CFLAGS) Characters/Paladin.cpp -o paladin.o

progress.o: Progress.cpp Progress.h
	$(CCOMPILER) -c $(CFLAGS) Progress.cpp -o progress.o
	
locations: location.o indoors.o outdoors.o

location.o: Locations/Location.cpp Locations/Location.h
	$(CCOMPILER) -c $(CFLAGS) Locations/Location.cpp -o location.o
	
indoors.o: Locations/Indoors.cpp Locations/Indoors.h Locations/Location.h
	$(CCOMPILER) -c $(CFLAGS) Locations/Indoors.cpp -o indoors.o
	
outdoors.o: Locations/Outdoors.cpp Locations/Outdoors.h Locations/Location.h
	$(CCOMPILER) -c $(CFLAGS) Locations/Outdoors.cpp -o outdoors.o

items: armor.o weapon.o otheritem.o

armor.o: Items/Armor.cpp Items/Armor.h Items/Item.h
	$(CCOMPILER) -c $(CFLAGS) Items/Armor.cpp -o armor.o

weapon.o: Items/Weapon.cpp Items/Weapon.h Items/Item.h
	$(CCOMPILER) -c $(CFLAGS) Items/Weapon.cpp -o weapon.o

otheritem.o: Items/OtherItem.cpp Items/OtherItem.h Items/Item.h
	$(CCOMPILER) -c $(CFLAGS) Items/OtherItem.cpp -o otheritem.o

util.o: Util.h Util.cpp
	$(CCOMPILER) -c $(CFLAGS) Util.cpp -o util.o

clean: 
	rm -r *.o game
